const crypto = require('crypto');

const secret = 'abcdefg';

module.exports = (pwd) => {
    const hash = crypto.createHmac('sha256', secret)
                   .update(pwd)  //加密的内容
                   .digest('hex');
    return hash
}
